#pragma once
#include "ScriptLib/BinBuf.h"
#include "ScriptLib/Interpreter.h"
class CNPC;
struct NpcSvrNpcInfo;


enum SCRIPT_FUNC_ENUM
{
	FUNC_RETURN                            = 0,
	FUNC_ITEM                              = 1,
	FUNC_EVENT                             = 2,
	FUNC_GET                               = 3,
	FUNC_INC                               = 4,
	FUNC_DEC                               = 5,
	FUNC_ENABLESKILL                       = 6,
	FUNC_DISABLESKILL                      = 7,
	FUNC_SUMMON                            = 8,
	FUNC_SKILL                             = 9,
	FUNC_CREATEITEM                        = 10,
	FUNC_LOSTITEM                          = 11,
	FUNC_HEALHP                            = 12,
	FUNC_HEALSP                            = 13,
	FUNC_HEALALL                           = 14,
	FUNC_CONDITION                         = 15,
	FUNC_CURE                              = 16,
	FUNC_ADDEXTPARAM                       = 17,
	FUNC_SUBEXTPARAM                       = 18,
	FUNC_SETMAKABLE_WPNLIST                = 19,
	FUNC_SETMAKABLE_MTLLIST                = 20,
	FUNC_RACE_ADD_DAMAGE                   = 21,
	FUNC_RACE_SUB_DAMAGE                   = 22,
	FUNC_ATTR_ADD_TOLERACE                 = 23,
	FUNC_ATTR_SUB_TOLERACE                 = 24,
	FUNC_RACE_ADD_TOLERACE                 = 25,
	FUNC_RACE_SUB_TOLERACE                 = 26,
	FUNC_ADDDAMAGE_PROPERTY                = 27,
	FUNC_SUBDAMAGE_PROPERTY                = 28,
	FUNC_ADDDAMAGE_SIZE                    = 29,
	FUNC_SUBDAMAGE_SIZE                    = 30,
	FUNC_ADDDAMAGE_NAME                    = 31,
	FUNC_SUBDAMAGE_NAME                    = 32,
	FUNC_ADDDAMAGE_SKID                    = 33,
	FUNC_SUBDAMAGE_SKID                    = 34,
	FUNC_ADDDAMAGE_CRI                     = 35,
	FUNC_SUBDAMAGE_CRI                     = 36,
	FUNC_ADDSTATE_MLEATK                   = 37,
	FUNC_SUBSTATE_MLEATK                   = 38,
	FUNC_ADDSTATE_MLEATTACKED              = 39,
	FUNC_SUBSTATE_MLEATTACKED              = 40,
	FUNC_ADDHEALPERCENT_ITEM               = 41,
	FUNC_SUBHEALPERCENT_ITEM               = 42,
	FUNC_ADDHEALAMOUNT_KILL                = 43,
	FUNC_SUBHEALAMOUNT_KILL                = 44,
	FUNC_INDESTRUCTIBLE_ARMOR              = 45,
	FUNC_INDESTRUCTIBLE_WEAPON             = 46,
	FUNC_ADD_STATE_TOLERACE                = 47,
	FUNC_SUB_STATE_TOLERACE                = 48,
	FUNC_BODY_ATTRIBUTE                    = 49,
	FUNC_SUB_RANGE_ATTACKDAMAGE            = 50,
	FUNC_ADD_RANGE_ATTACKDAMAGE            = 51,
	FUNC_NODISPELL                         = 52,
	FUNC_ADD_HPDRAIN                       = 53,
	FUNC_SUB_HPDRAIN                       = 54,
	FUNC_MAGICIMMUNE                       = 55,
	FUNC_NOJAMSTONE                        = 56,
	FUNC_ADD_SPDRAIN                       = 57,
	FUNC_SUB_SPDRAIN                       = 58,
	FUNC_ADD_MELEEATTACK_REFLECT           = 59,
	FUNC_SUB_MELEEATTACK_REFLECT           = 60,
	FUNC_PERFECT_DAMAGE                    = 61,
	FUNC_REINCARNATION                     = 62,
	FUNC_SUB_SPELLCASTTIME                 = 63,
	FUNC_ADD_SPELLCASTTIME                 = 64,
	FUNC_SPLASH_ATTACK                     = 65,
	FUNC_SUB_SPCONSUMPTION                 = 66,
	FUNC_ADD_SPCONSUMPTION                 = 67,
	FUNC_START_CAPTURE                     = 68,
	FUNC_INCUBATION                        = 69,
	FUNC_ADDATK_DAMAGEWEAPON               = 70,
	FUNC_SUBATK_DAMAGEWEAPON               = 71,
	FUNC_ADDATK_DAMAGEARMOR                = 72,
	FUNC_SUBATK_DAMAGEARMOR                = 73,
	FUNC_ADDRECEIVEITEM_RACE               = 74,
	FUNC_SUBRECEIVEITEM_RACE               = 75,
	FUNC_SETIGNOREDEFRACE                  = 76,
	FUNC_RESETIGNOREDEFRACE                = 77,
	FUNC_SETIGNOREDEFCLASS                 = 78,
	FUNC_RESETIGNOREDEFCLASS               = 79,
	FUNC_SET_DISAPPEARHPAMOUNT             = 80,
	FUNC_RESET_DISAPPEARHPAMOUNT           = 81,
	FUNC_SET_DISAPPEARSPAMOUNT             = 82,
	FUNC_RESET_DISAPPEARSPAMOUNT           = 83,
	FUNC_SETAUTOSPELL                      = 84,
	FUNC_ADDATK_COMARACE                   = 85,
	FUNC_SUBATK_COMARACE                   = 86,
	FUNC_ADDATK_COMA                       = 87,
	FUNC_SUBATK_COMA                       = 88,
	FUNC_SUBSPAMOUNT_ACTION                = 89,
	FUNC_ADDSPAMOUNT_ACTION                = 90,
	FUNC_SUBSPAMOUNT_ATTACK                = 91,
	FUNC_ADDSPAMOUNT_ATTACK                = 92,
	FUNC_ADDSPAMOUNT_ATKRACE               = 93,
	FUNC_SUBSPAMOUNT_ATKRACE               = 94,
	FUNC_ADDDESTROYSP_ATTACK               = 95,
	FUNC_SUBDESTROYSP_ATTACK               = 96,
	FUNC_ADDSPAMOUNT_KILLRACE              = 97,
	FUNC_SUBSPAMOUNT_KILLRACE              = 98,
	FUNC_ADDEXPPERCENT_KILLRACE            = 99,
	FUNC_SUBEXPPERCENT_KILLRACE            = 100,
	FUNC_CLASSADDDAMAGE                    = 101,
	FUNC_CLASSSUBDAMAGE                    = 102,
	FUNC_RACEADDDAMAGESELF                 = 103,
	FUNC_RACESUBDAMAGESELF                 = 104,
	FUNC_SETINVESTIGATE                    = 105,
	FUNC_RESETINVESTIGATE                  = 106,
	FUNC_MODIFYDEF_FRACTION                = 107,
	FUNC_ADDGUIDEATTACK                    = 108,
	FUNC_SUBGUIDEATTACK                    = 109,
	FUNC_ADDCHANGEMONSTER                  = 110,
	FUNC_SUBCHANGEMONSTER                  = 111,
	FUNC_ADDCRIPERCENT_RACE                = 112,
	FUNC_SUBCRIPERCENT_RACE                = 113,
	FUNC_SETPUSHINGSKILL                   = 114,
	FUNC_RESETPUSHINGSKILL                 = 115,
	FUNC_GETZENY_RANGE                     = 116,
	FUNC_MULTICASTEFFECT                   = 117,
	FUNC_SETEXTPARAMTIME                   = 118,
	FUNC_SETAUTOSPELL_TARGET               = 119,
	FUNC_UNUSED_SETAUTOSPELL_SELF          = 120,
	FUNC_SETRECEIVEZENY_KILL               = 121,
	FUNC_ADDCRI_RANGEATK                   = 122,
	FUNC_SUBCRI_RANGEATK                   = 123,
	FUNC_ADDSTATE_RANGEATK                 = 124,
	FUNC_SUBSTATE_RANGEATK                 = 125,
	FUNC_ADDGUILDEXP                       = 126,
	FUNC_SETRECEIVEITEM_GROUP              = 127,
	FUNC_ADDREFLECT_MAGIC                  = 128,
	FUNC_SUBREFLECT_MAGIC                  = 129,
	FUNC_ITEMCREATE                        = 130,
	FUNC_ISCOMPLETECOMBINATION             = 131,
	FUNC_ISBREAKCOMBINATION                = 132,
	FUNC_UNUSED_SETAUTOSPELL_MLEATKED      = 133,
	FUNC_GETREFINELEVEL                    = 134,
	FUNC_GETSKILLLEVEL                     = 135,
	FUNC_GETPUREJOB                        = 136,
	FUNC_ADDGETITEM_KILL                   = 137,
	FUNC_SUBGETITEM_KILL                   = 138,
	FUNC_ADDPARAMETERVALUE                 = 139,
	FUNC_EVOLUTION_HOMUN                   = 140,
	FUNC_ADDPARAMTIME                      = 141,
	FUNC_SUBPARAMTIME                      = 142,
	FUNC_ADDDAMAGETM_PROP                  = 143,
	FUNC_SUBSAMAGETM_PROP                  = 144,
	FUNC_COOKING                           = 145,
	FUNC_SUMMONNPC                         = 146,
	FUNC_TRACE                             = 147,
	FUNC_VAR                               = 148,
	FUNC_LOCALVAR                          = 149,
	FUNC_NPCVAR                            = 150,
	FUNC_INCLOCALVAR                       = 151,
	FUNC_DECLOCALVAR                       = 152,
	FUNC_SETLOCALVAR                       = 153,
	FUNC_GETEQUIP_IS_IDENTIFY              = 154,
	FUNC_GETEQUIP_REFINERYCNT              = 155,
	FUNC_GETEQUIP_PERCENTREFINERY          = 156,
	FUNC_GETEQUIP_GETEQUIPREFINERYCOST     = 157,
	FUNC_GETEQUIP_IS_SUCCESSREFINERY       = 158,
	FUNC_GETEQUIP_NAME                     = 159,
	FUNC_GETEQUIP_ITEMIDX                  = 160,
	FUNC_GETEQUIP_WEAPONLV                 = 161,
	FUNC_GETEQUIP_IS_ENABLEREF             = 162,
	FUNC_LASTNPCNAME                       = 163,
	FUNC_PCNAME                            = 164,
	FUNC_ONINIT                            = 165,
	FUNC_ONCLICK                           = 166,
	FUNC_ONTOUCH                           = 167,
	FUNC_ONMYMOBDEAD                       = 168,
	FUNC_ONTIMER                           = 169,
	FUNC_ONCOMMAND                         = 170,
	FUNC_ONSTARTARENA                      = 171,
	FUNC_RAND                              = 172,
	FUNC_LOT                               = 173,
	FUNC_GETPCCOUNT                        = 174,
	FUNC_ONTOUCHNPC                        = 175,
	FUNC_ONTOUCH2                          = 176,
	FUNC_GUIDE                             = 177,
	FUNC_NPC                               = 178,
	FUNC_MOB                               = 179,
	FUNC_GATE                              = 180,
	FUNC_TRADER                            = 181,
	FUNC_ARENAGUIDE                        = 182,
	FUNC_HIDDENWARP                        = 183,
	FUNC_EFFECT                            = 184,
	FUNC_DIALOG                            = 185,
	FUNC_PUTMOB                            = 186,
	FUNC_MOVETO                            = 187,
	FUNC_SAY                               = 188,
	FUNC_MENU                              = 189,
	FUNC_GETMONEY                          = 190,
	FUNC_DROPMONEY                         = 191,
	FUNC_GETITEM                           = 192,
	FUNC_DROPITEM                          = 193,
	FUNC_SETITEM                           = 194,
	FUNC_WAITDIALOG                        = 195,
	FUNC_CLOSEDIALOG                       = 196,
	FUNC_HPFULLHEAL                        = 197,
	FUNC_SPFULLHEAL                        = 198,
	FUNC_HPHEAL                            = 199,
	FUNC_SPHEAL                            = 200,
	FUNC_POISONHEAL                        = 201,
	FUNC_STONEHEAL                         = 202,
	FUNC_CURSEHEAL                         = 203,
	FUNC_FREEZINGHEAL                      = 204,
	FUNC_SILENCEHEAL                       = 205,
	FUNC_CONFUSIONHEAL                     = 206,
	FUNC_SELLITEM                          = 207,
	FUNC_BUYITEM                           = 208,
	FUNC_JOBCHANGE                         = 209,
	FUNC_EXCHANGEITEM                      = 210,
	FUNC_ERROR                             = 211,
	FUNC_CHECKPOINT                        = 212,
	FUNC_STORE                             = 213,
	FUNC_CART                              = 214,
	FUNC_DLGWRITE                          = 215,
	FUNC_INPUT                             = 216,
	FUNC_INPUTSTR                          = 217,
	FUNC_COMPASS                           = 218,
	FUNC_NUDE                              = 219,
	FUNC_SHOW_IMAGE                        = 220,
	FUNC_CHANGE_PALLETE                    = 221,
	FUNC_CALLMONSTER                       = 222,
	FUNC_ADDSKILL                          = 223,
	FUNC_OTHERNPC_CMD                      = 224,
	FUNC_STRLOCALVAR                       = 225,
	FUNC_INITTIMER                         = 226,
	FUNC_SETARENAEVENTSIZE                 = 227,
	FUNC_MAKEWAITINGROOM                   = 228,
	FUNC_ENABLEARENA                       = 229,
	FUNC_DISABLEARENA                      = 230,
	FUNC_WARPWAITINGPCTOARENA              = 231,
	FUNC_RESETMYMOB                        = 232,
	FUNC_WARPALLPCINTHEMAP                 = 233,
	FUNC_BROADCASTINTHEMAP                 = 234,
	FUNC_STOPTIMER                         = 235,
	FUNC_ADDNPCTIMER                       = 236,
	FUNC_SUBNPCTIMER                       = 237,
	FUNC_ENABLENPC                         = 238,
	FUNC_DISABLENPC                        = 239,
	FUNC_CALLNPC                           = 240,
	FUNC_SETFEEZENY                        = 241,
	FUNC_SETFEEITEM                        = 242,
	FUNC_SETREQLEVEL                       = 243,
	FUNC_SETTEXJOB                         = 244,
	FUNC_DISABLEITEMMOVE                   = 245,
	FUNC_ENABLEITEMMOVE                    = 246,
	FUNC_SUCCESSREFITEM                    = 247,
	FUNC_FAILEDREFITEM                     = 248,
	FUNC_SETEFFECTSTATUS                   = 249,
	FUNC_RESETSTAT                         = 250,
	FUNC_RESETSKILL                        = 251,
	FUNC_MENU2                             = 252,
	FUNC_SHOWDIGIT                         = 253,
	FUNC_EVENT_ADD_SKILL                   = 254,
	FUNC_EVENT_DEL_SKILL                   = 255,
	FUNC_SETPARAMETER                      = 256,
	FUNC_EMOTION                           = 257,
	FUNC_CHANGESPR                         = 258,
	FUNC_GETEQUIPCOUNT                     = 259,
	FUNC_AGITGET                           = 260,
	FUNC_AGITGET2                          = 261,
	FUNC_AGITSET                           = 262,
	FUNC_AGITFUNC                          = 263,
	FUNC_AGITNPCGET                        = 264,
	FUNC_AGITNPCSET                        = 265,
	FUNC_ISGUILDMASTER                     = 266,
	FUNC_PUTMOB2                           = 267,
	FUNC_AGITREGISTER                      = 268,
	FUNC_BROADCASTINMAP2                   = 269,
	FUNC_BROADCASTSERVER                   = 270,
	FUNC_SOUND                             = 271,
	FUNC_DLGWRITESTR                       = 272,
	FUNC_GETDAMAGEDITEMNUM                 = 273,
	FUNC_REPAIRDAMAGEDITEM                 = 274,
	FUNC_SAVEPPL                           = 275,
	FUNC_AGITEMBLEMFLAG                    = 276,
	FUNC_HPDRAIN                           = 277,
	FUNC_SPDRAIN                           = 278,
	FUNC_GETEXP                            = 279,
	FUNC_DROPEXP                           = 280,
	FUNC_SERVERTIME                        = 281,
	FUNC_GETLOCALVARNAME                   = 282,
	FUNC_GETMARRIED                        = 283,
	FUNC_COUNTDOWN                         = 284,
	FUNC_GETGUILDNAME                      = 285,
	FUNC_GETNEIGHBORPCNUMBER               = 286,
	FUNC_GETNAMEDITEM                      = 287,
	FUNC_DROPNAMEDITEM                     = 288,
	FUNC_GETCOUNTFOMYNAMEITEM              = 289,
	FUNC_CHANGE_HAIRSTYLE                  = 290,
	FUNC_SHOWEFFECT                        = 291,
	FUNC_FALCON                            = 292,
	FUNC_PECO                              = 293,
	FUNC_CHECK_MAXWEIGHT                   = 294,
	FUNC_CHECK_MAXCOUNT                    = 295,
	FUNC_CHECK_MAXZENY                     = 296,
	FUNC_MGETEVENT_ZENYNAME                = 297,
	FUNC_MGETEVENT_ITEMNAME                = 298,
	FUNC_MGETEVENT_ZENY                    = 299,
	FUNC_MGETEVENT_ITEM                    = 300,
	FUNC_CREATE_GUILD                      = 301,
	FUNC_CREATEGLOBALVAR                   = 302,
	FUNC_GETGLOBALVAR                      = 303,
	FUNC_SETGLOBALVAR                      = 304,
	FUNC_STRCMP                            = 305,
	FUNC_STRSTR                            = 306,
	FUNC_UPGRADEGUILDLEVEL                 = 307,
	FUNC_CREATEGLOBALSTR                   = 308,
	FUNC_GETGLOBALSTR                      = 309,
	FUNC_SETGLOBALSTR                      = 310,
	FUNC_DIVORCE                           = 311,
	FUNC_GET_TABLEPOINT                    = 312,
	FUNC_ADD_TABLEPOINT                    = 313,
	FUNC_DEL_TABLEPOINT                    = 314,
	FUNC_PCDATA_MOVE_TO_PVP                = 315,
	FUNC_GETPVPPOINT                       = 316,
	FUNC_SETPVPPOINT                       = 317,
	FUNC_MGETEVENT_ITEMID                  = 318,
	FUNC_GETJOBEXP                         = 319,
	FUNC_DROPJOBEXP                        = 320,
	FUNC_CHKSKILL                          = 321,
	FUNC_GETBODYSTATE                      = 322,
	FUNC_GETHEALTHSTATE                    = 323,
	FUNC_USESKILL_TO_PC                    = 324,
	FUNC_ISBABY                            = 325,
	FUNC_GETLOTTO                          = 326,
	FUNC_SETLOTTO                          = 327,
	FUNC_INITLOTTO                         = 328,
	FUNC_OPENAUCTION                       = 329,
	FUNC_OPENMAILING                       = 330,
	FUNC_STRIPTPC                          = 331,
	FUNC_PUSHPC                            = 332,
	FUNC_ITEMDOWN                          = 333,
	FUNC_SETNUMARRAY                       = 334,
	FUNC_GETNUMARRAY                       = 335,
	FUNC_SHUFFLENUMBERS                    = 336,
	FUNC_PARTYNAME                         = 337,
	FUNC_CHANGESPEED                       = 338,
	FUNC_ISSIEGETIME                       = 339,
	FUNC_CONSUMESPECIALITEM                = 340,
	FUNC_SETITEMPARTYINMAP                 = 341,
	FUNC_ISHUNTINGLISTFULL                 = 342,
	FUNC_FINDHUNTINGLIST                   = 343,
	FUNC_ADDHUNTINGLIST                    = 344,
	FUNC_DELETEHUNTINGLIST                 = 345,
	FUNC_DISPLAYHUNTINGLIST                = 346,
	FUNC_DISPLAYHUNTINGLIST2               = 347,
	FUNC_SETHUNTINGLIST                    = 348,
	FUNC_CLEARHUNTINGLIST                  = 349,
	FUNC_ISTIMELISTFULL                    = 350,
	FUNC_FINDTIMELIST                      = 351,
	FUNC_ADDTIMELIST                       = 352,
	FUNC_DELETETIMELIST                    = 353,
	FUNC_DISPLAYTIMELIST                   = 354,
	FUNC_SETTIMELIST                       = 355,
	FUNC_CLEARTIMELIST                     = 356,
	FUNC_CHANGECELLTYPE                    = 357,
	FUNC_GETCELLTYPE                       = 358,
	FUNC_ISPCCAFE                          = 359,
	FUNC_GETPAYTYPE                        = 360,
	FUNC_GETCONNECTIONAREA                 = 361,
	FUNC_GETCONNECTIONSTATE                = 362,
	FUNC_GETPETEGG                         = 363,
	FUNC_CASHTRADER                        = 364,
	FUNC_CASHSHOP                          = 365,
	FUNC_ADDEXPTIME                        = 366,
	FUNC_SUBEXPTIME                        = 367,
	FUNC_ADDRECEIVEITEM                    = 368,
	FUNC_ADVEQUIP_ISSUCCESSREFINERY        = 369,
	FUNC_PARTYCALL                         = 370,
	FUNC_PUTBOSS                           = 371,
	FUNC_USEBOSSPERCEPTION                 = 372,
	FUNC_SKILLTOME                         = 373,
	FUNC_UseHuntingList                    = 374,
	FUNC_CheckHuntingList                  = 375,
	FUNC_ITEM2                             = 376,
	FUNC_WEAPONPROPERTY                    = 377,
	FUNC_READBOOK                          = 378,
	FUNC_MERCENARY_SUMMON                  = 379,
	FUNC_MERCENARY_HEALHP                  = 380,
	FUNC_MERCENARY_HEALSP                  = 381,
	FUNC_GETMERCENARYTOTALSUMMONNUM        = 382,
	FUNC_GETMERCENARYFAITH                 = 383,
	FUNC_SUBMERCENARYFAITH                 = 384,
	FUNC_ADDMERCENARYFAITH                 = 385,
	FUNC_NPC2                              = 386,
	FUNC_ONMOVENPCCMD                      = 387,
	FUNC_MOVEPOS                           = 388,
	FUNC_MOVEWAIT                          = 389,
	FUNC_REFINERY                          = 390,
	FUNC_MERCENARY_CONDITION               = 391,
	FUNC_ADDNEVERKNOCKBACK                 = 392,
	FUNC_GETADVEQUIPPERCENTREFINERY        = 393,
	FUNC_RELOAD_MOBILE_EVENT               = 394,
	FUNC_SETTEMPTIME                       = 395,
	FUNC_ELAPSETEMPTIME                    = 396,
	FUNC_SUBNEVERKNOCKBACK                 = 397,
	FUNC_GETWEAPONCLASS                    = 398,
	FUNC_GETEQUIPSLOTAMOUNT                = 399,
	FUNC_ADDHEALVALUE                      = 400,
	FUNC_SUBHEALVALUE                      = 401,
	FUNC_UNUSED_SETAUTOSPELL_MAGATKED      = 402,
	FUNC_ADDHPAMOUNT_MAGKILL               = 403,
	FUNC_SUBHPAMOUNT_MAGKILL               = 404,
	FUNC_ADDSPAMOUNT_MAGKILL               = 405,
	FUNC_SUBSPAMOUNT_MAGKILL               = 406,
	FUNC_ADDSPELLDELAY                     = 407,
	FUNC_SUBSPELLDELAY                     = 408,
	FUNC_ADDSPECIFICSPELLCASTTIME          = 409,
	FUNC_SUBSPECIFICSPELLCASTTIME          = 410,
	FUNC_ADDMDAMAGE_RACE                   = 411,
	FUNC_SUBMDAMAGE_RACE                   = 412,
	FUNC_ADDMDAMAGE_CLASS                  = 413,
	FUNC_SUBMDAMAGE_CLASS                  = 414,
	FUNC_SETIGNOREMDEFRACE                 = 415,
	FUNC_RESETIGNOREMDEFRACE               = 416,
	FUNC_SETIGNOREMDEFCLASS                = 417,
	FUNC_RESETIGNOREMDEFCLASS              = 418,
	FUNC_SETHPAMOUNTTIME                   = 419,
	FUNC_RESETHPAMOUNTTIME                 = 420,
	FUNC_SETSPAMOUNTTIME                   = 421,
	FUNC_RESETSPAMOUNTTIME                 = 422,
	FUNC_SETIGNOREDEFRACE_PERCENT          = 423,
	FUNC_RESETIGNOREDEFRACE_PERCENT        = 424,
	FUNC_SETIGNOREDEFCLASS_PERCENT         = 425,
	FUNC_RESETIGNOREDEFCLASS_PERCENT       = 426,
	FUNC_GETINVENTORYREMAINCOUNT           = 427,
	FUNC_SETAUTOWEAPON                     = 428,
	FUNC_RESETAUTOWEAPON                   = 429,
	FUNC_SETAUTOMWEAPON                    = 430,
	FUNC_RESETAUTOMWEAPON                  = 431,
	FUNC_SETAUTOATTACKED                   = 432,
	FUNC_RESETAUTOATTACKED                 = 433,
	FUNC_SETAUTOMATTACKED                  = 434,
	FUNC_RESETAUTOMATTACKED                = 435,
	FUNC_RESETRECEIVEITEM_GROUP            = 436,
	FUNC_BUFF                              = 437,
	FUNC_SETBUFF                           = 438,
	FUNC_GETBUFFVALUE                      = 439,
	FUNC_ADDHEALMODIFYPERCENT              = 440,
	FUNC_SUBHEALMODIFYPERCENT              = 441,
	FUNC_SETHPPERCENTTIME                  = 442,
	FUNC_RESETHPPERCENTTIME                = 443,
	FUNC_SETSPPERCENTTIME                  = 444,
	FUNC_RESETSPPERCENTTIME                = 445,
	FUNC_LOUDSPEAKER                       = 446,
	FUNC_SETTARGETATTACKED_BUFF            = 447,
	FUNC_RESETTARGETATTACKED_BUFF          = 448,
	FUNC_GETMAPNAME                        = 449,
	FUNC_SETQUEST                          = 450,
	FUNC_CHANGQUEST                        = 451,
	FUNC_ERASEQUEST                        = 452,
	FUNC_COMPLATEQUEST                     = 453,
	FUNC_COMPLETEQUEST_BETWEEN             = 454,
	FUNC_RECALL_COMPLETEQUEST              = 455,
	FUNC_ISBEGINQUEST                      = 456,
	FUNC_CHECKQUEST_HUNTING                = 457,
	FUNC_CHECKQUEST_PLAYTIME               = 458,
	FUNC_GETLASTSIEGEMSG                   = 459,
	FUNC_PCDATA_MOVE_TO_SAKRAY             = 460,
	FUNC_CALLGUARDIAN                      = 461,
	FUNC_ISPREMIUMPCCAFE                   = 462,
	FUNC_MDUNGEON_SUBSCRIPTION             = 463,
	FUNC_MDUNGEON_ENTER                    = 464,
	FUNC_CAMPCODE                          = 465,
	FUNC_GETCAMPCODE                       = 466,
	FUNC_CALLCAMPMOB                       = 467,
	FUNC_SETRP2                            = 468,
	FUNC_MASSSETRP2                        = 469,
	FUNC_PLAYERTORP                        = 470,
	FUNC_MGETEVENT_ZENYNAME_EXCULUSEIVE    = 471,
	FUNC_MGETEVENT_ITEMNAME_EXCULUSEIVE    = 472,
	FUNC_MGETEVENT_ZENY_EXCULUSEIVE        = 473,
	FUNC_MGETEVENT_ITEM_EXCULUSEIVE        = 474,
	FUNC_MGETEVENT_ITEMID_EXCULUSEIVE      = 475,
	FUNC_MGETEVENT_RELOAD_EXCULUSEIVE      = 476,
	FUNC_MDUNGEON_LIST                     = 477,
	FUNC_MDUNGEON_DESTROY                  = 478,
	FUNC_PLUSCAMPPOINT                     = 479,
	FUNC_MINUSCAMPPOINT                    = 480,
	FUNC_GETCAMPPOINT                      = 481,
	FUNC_RESETCAMPPOINT                    = 482,
	FUNC_CHECKSIEGETIME                    = 483,
	FUNC_ADDSTATE_MATK                     = 484,
	FUNC_SUBSTATE_MATK                     = 485,
	FUNC_ADDSTATE_MATTACKED                = 486,
	FUNC_SUBSTATE_MATTACKED                = 487,
	FUNC_MDUNGEON_MAPNAME                  = 488,
	FUNC_MDUNGEON_NPCNAME                  = 489,
	FUNC_MDUNGEON_NPC                      = 490,
	FUNC_MDUNGEON_WAP                      = 491,
	FUNC_MDUNGEON_HIDDENWAP                = 492,
	FUNC_MDUNGEON_PUTMOB                   = 493,
	FUNC_MYMOBSKILLUSE                     = 494,
	FUNC_WHEREMYMOB_X                      = 495,
	FUNC_WHEREMYMOB_Y                      = 496,
	FUNC_WIDEMOBSKILLUSE                   = 497,
	FUNC_WIDEMOBSKILLUSE2                  = 498,
	FUNC_MDUNGEON_OPENSTATE                = 499,
	FUNC_ADDHPDRAIN_100                    = 500,
	FUNC_SUBHPDRAIN_100                    = 501,
	FUNC_CREATEPACKAGE                     = 502,
	FUNC_ISBENDER                          = 503,
	FUNC_MOVERESUME                        = 504,
	FUNC_MOVERETURN                        = 505,
	FUNC_MOVESPEED                         = 506,
	FUNC_GETNPCPOSITION                    = 507,
	FUNC_ADDRECEIVEITEM_EQUIP              = 508,
	FUNC_SUBRECEIVEITEM_EQUIP              = 509,
	FUNC_ADDONLYJOBEXPTIME                 = 510,
	FUNC_PROGRESS_BAR                      = 511,
	FUNC_MERCENARYCHECK                    = 512,
	FUNC_MERCENARYTYPE                     = 513,
	FUNC_ISFREESERVER                      = 514,
	FUNC_SETSKILLAUTOSPELL                 = 515,
	FUNC_RESETSKILLAUTOSPELL               = 516,
	FUNC_SETSKILLACTIVATE                  = 517,
	FUNC_RESETSKILLACTIVATE                = 518,
	FUNC_GETACTIVATED_SKILL                = 519,
	FUNC_GETDEACTIVATED_SKILL              = 520,
	FUNC_ADDSTATE_SKID                     = 521,
	FUNC_SUBSTATE_SKID                     = 522,
	FUNC_SETAUTOSPELLMAGIC                 = 523,
	FUNC_RESETAUTOSPELLMAGIC               = 524,
	FUNC_RUN_NPC                           = 525,
	FUNC_RUN_NPCTRADER                     = 526,
	FUNC_ONCAMPCOMMAND                     = 527,
	FUNC_CHECKPARTYJOB                     = 528,
	FUNC_CLEARBUFF                         = 529,
	FUNC_CHECKALIVE                        = 530,
	FUNC_KVM_NPC                           = 531,
	FUNC_KVM_START_ALIVECHECK              = 532,
	FUNC_PVPRANKCHECK                      = 533,
	FUNC_UNUSED_SETAUTOSPELL_MLEATK        = 534,
	FUNC_SETAUTOSPELL_RANGEATK             = 535,
	FUNC_KVM_NPC_NOTI                      = 536,
	FUNC_GETARENAEVENTSIZE                 = 537,
	FUNC_SETMAKABLERUNEITEMLIST            = 538,
	FUNC_ISSUCCESSRUNEUSE                  = 539,
	FUNC_SETMAKABLENEWPOISONLIST           = 540,
	FUNC_GETITEMSOCKET                     = 541,
	FUNC_GETPETRELATIONSHIP                = 542,
	FUNC_ADDMDAMAGE_NAME                   = 543,
	FUNC_SUBMDAMAGE_NAME                   = 544,
	FUNC_GETNONSLOTITEMSOCK                = 545,
	FUNC_ISEFFECTSTATUS                    = 546,
	FUCN_GETMYMERCENARY                    = 547,
	FUNC_ERRORLOG                          = 548,
	FUNC_ADDRECEIVEITEM_NAME               = 549,
	FUNC_SUBRECEIVEITEM_NAME               = 550,
	FUNC_ISMADOGEAR                        = 551,
	FUNC_SETMADOGEAR                       = 552,
	FUNC_ADD_SFCT_CONSUME_AMOUNT           = 553,
	FUNC_SUB_SFCT_CONSUME_AMOUNT           = 554,
	FUNC_ADD_SFCT_CONSUME_PERMILL          = 555,
	FUNC_SUB_SFCT_CONSUME_PERMILL          = 556,
	FUNC_ADD_SFCT_EQUIP_AMOUNT             = 557,
	FUNC_SUB_SFCT_EQUIP_AMOUNT             = 558,
	FUNC_ADD_SFCT_EQUIP_PERMILL            = 559,
	FUNC_SUB_SFCT_EQUIP_PERMILL            = 560,
	FUNC_ADDATTRTOLERACE_DISREGARD         = 561,
	FUNC_SUBATTRTOLERACE_DISREGARD         = 562,
	FUNC_GETEXDEQUIPISSUCCESSREFINERY      = 563,
	FUNC_GETEXDADVEQUIPISSUCCESSREFINERY   = 564,
	FUNC_DOWNREFITEM                       = 565,
	FUNC_DOWNADVREFITEM                    = 566,
	FUNC_SUCCESSRANDREFITEM                = 567,
	FUNC_SUCCESSRANDADVREFITEM             = 568,
	FUNC_FINAL_BATTLE_PLAY                 = 569,
	FUNC_ONCAMPCOMMAND2                    = 570,
	FUNC_INTEROTHER                        = 571,
	FUNC_UNUSED_SETAUTOSPELL_MLEATKED_V2   = 572,
	FUNC_UNUSED_SETAUTOSPELL_RANGEATKED_V2 = 573,
	FUNC_ADDSKILLSP                        = 574,
	FUNC_SUBSKILLSP                        = 575,
	FUNC_ADDSKILLDELAY                     = 576,
	FUNC_SUBSKILLDELAY                     = 577,
	FUNC_PLAYBGM                           = 578,
	FUNC_STRIPTPC2                         = 579,
	FUNC_ADDSTATECASTTIME                  = 580,
	FUNC_SUBSTATECASTTIME                  = 581,
	FUNC_ADDSKILLMDAMAGE                   = 582,
	FUNC_SUBSKILLMDAMAGE                   = 583,
	FUNC_GETLOCATION                       = 584,
	FUNC_BROADCAST_IN_ZONE                 = 585,
	FUNC_BROADCAST_IN_MAP                  = 586,
	FUNC_SET_ITEM_EFFECT                   = 587,
	FUNC_RESET_ITEM_EFFECT                 = 588,
	FUNC_SETREADYMUTATIONHOMUN             = 589,
	FUNC_MUTATIONHOMUN                     = 590,
	FUNC_MODIFYMDEF_FRACTION               = 591,
	FUNC_ADDALLDEF_FLUCTUATION             = 592,
	FUNC_SUBALLDEF_FLUCTUATION             = 593,
	FUNC_ADDALLMDEF_FLUCTUATION            = 594,
	FUNC_SUBALLMDEF_FLUCTUATION            = 595,
	FUNC_OPEN_SEARCH_STORE_INFO            = 596,
	FUNC_CHANGERP                          = 597,
	FUNC_ISALLIANCEGUILD                   = 598,
	FUNC_OPENHOUR_SIEGEMODE                = 599,
	FUNC_CHECKHOMUNLEVEL                   = 600,
	FUNC_CHECKHOMUNMUTATION                = 601,
	FUNC_CHECKHOMUNCALL                    = 602,
	FUNC_SETBATTLEFIELDMOVEPOSTION         = 603,
	FUNC_GETEQUIPCOMPOSITIONTYPE           = 604,
	FUNC_GETEQUIPDBNAME                    = 605,
	FUNC_GETEQUIPCARDID                    = 606,
	FUNC_DROPEQUIPITEM                     = 607,
	FUNC_GETREFITEM                        = 608,
	FUNC_RESETBUFF                         = 609,
	FUNC_ADDSTATE_EFSTATK                  = 610,
	FUNC_SUBSTATE_EFSTATK                  = 611,
	FUNC_GETNONSLOTITEMSOCK2               = 612,
	FUNC_GETITEM2                          = 613,
	FUNC_SHOWSCRIPT                        = 614,
	FUNC_SHOWEMOTION                       = 615,
	FUNC_START_COLLECTION                  = 616,
	FUNC_MONTRANSFORM                      = 617,
	FUNC_DELETE_ALL_BODY_ITEM              = 618,
	FUNC_ONAGITINVEST                      = 619,
	FUNC_INC_GLOBALVAR                     = 620,
	FUNC_DEC_GLOBALVAR                     = 621,
	FUNC_GET_AGITINVEST_MSG                = 622,
	FUNC_ADD_HANDICAPSTATE_RACE            = 623,
	FUNC_SUB_HANDICAPSTATE_RACE            = 624,
	FUNC_SET_NUM_DEF_RACE                  = 625,
	FUNC_RESET_NUM_DEF_RACE                = 626,
	FUNC_SET_NUM_MDEF_RACE                 = 627,
	FUNC_RESET_NUM_MDEF_RACE               = 628,
	FUNC_SET_PER_DEF_SELF                  = 629,
	FUNC_SET_PER_MDEF_SELF                 = 630,
	FUNC_SET_MHP_PER_DAMAGE_RACE           = 631,
	FUNC_RESET_MHP_PER_DAMAGE_RACE         = 632,
	FUNC_SET_MSP_PER_DAMAGE_RACE           = 633,
	FUNC_RESET_MSP_PER_DAMAGE_RACE         = 634,
	FUNC_GET_AGIT_ECONOMY                  = 635,
	FUNC_INC_AGIT_ECONOMY                  = 636,
	FUNC_DEC_AGIT_ECONOMY                  = 637,
	FUNC_EQ_MAKE                           = 638,
	FUNC_EQ_CHECK_USER                     = 639,
	FUNC_EQ_NOTIFY_ADMISSION               = 640,
	FUNC_EQ_IS_READY                       = 641,
	FUNC_EQ_MOVE_TO_ROOM                   = 642,
	FUNC_EQ_RETURN_TO_PRE_SPACE            = 643,
	FUNC_EQ_MOVE_TO_LOBBY                  = 644,
	FUNC_LOBBY_MAKE                        = 645,
	FUNC_LOBBY_USER_COUNT                  = 646,
	FUNC_LOBBY_NOTIFY_ADMISSION            = 647,
	FUNC_LOBBY_IS_READY                    = 648,
	FUNC_LOBBY_MOVE_TO_ROOM                = 649,
	FUNC_LOBBY_RETURN_TO_PRE_SPACE         = 650,
	FUNC_LOBBY_INIT                        = 651,
	FUNC_CLEARDIALOG                       = 652,
	FUNC_NAVIGATION_ACTIVE                 = 653,
	FUNC_ACTIVE_MONTRANSFORM               = 654,
	FUNC_DEACTIVE_MONTRANSFORM             = 655,
	FUNC_SETAUTOSPELL2                     = 656,
	FUNC_SETAUTOSPELL2_MLEATKED            = 657,
	FUNC_SETAUTOSPELL2_MLEATKED_SHORT      = 658,
	FUNC_SETAUTOSPELL2_MLEATKED_LONG       = 659,
	FUNC_SETAUTOSPELL2_MAGATKED            = 660,
	FUNC_SETAUTOSPELL2_MLEATK              = 661,
	FUNC_SETAUTOSPELL2_RANGEATK            = 662,
	FUNC_RESETAUTOSPELL2                   = 663,
	FUNC_RESETAUTOSPELL2_MLEATKED          = 664,
	FUNC_RESETAUTOSPELL2_MLEATKED_SHORT    = 665,
	FUNC_RESETAUTOSPELL2_MLEATKED_LONG     = 666,
	FUNC_RESETAUTOSPELL2_MAGATKED          = 667,
	FUNC_RESETAUTOSPELL2_MLEATK            = 668,
	FUNC_RESETAUTOSPELL2_RANGEATK          = 669,
	FUNC_PAUSEAUTOSPELL2                   = 670,
	FUNC_PAUSEAUTOSPELL2_MLEATKED          = 671,
	FUNC_PAUSEAUTOSPELL2_MLEATKED_SHORT    = 672,
	FUNC_PAUSEAUTOSPELL2_MLEATKED_LONG     = 673,
	FUNC_PAUSEAUTOSPELL2_MAGATKED          = 674,
	FUNC_PAUSEAUTOSPELL2_MLEATK            = 675,
	FUNC_PAUSEAUTOSPELL2_RANGEATK          = 676,
	FUNC_RESUMEAUTOSPELL2                  = 677,
	FUNC_RESUMEAUTOSPELL2_MLEATKED         = 678,
	FUNC_RESUMEAUTOSPELL2_MLEATKED_SHORT   = 679,
	FUNC_RESUMEAUTOSPELL2_MLEATKED_LONG    = 680,
	FUNC_RESUMEAUTOSPELL2_MAGATKED         = 681,
	FUNC_RESUMEAUTOSPELL2_MLEATK           = 682,
	FUNC_RESUMEAUTOSPELL2_RANGEATK         = 683,
	FUNC_CHECK_JOB_GROUP                   = 684,
	FUNC_GETPREMIUMCAMPAIGN_GRADE          = 685,
	FUNC_GET_BASE_JOB                      = 686,
	FUNC_GET_CATEGORY_JOB                  = 687,
	FUNC_EQ_JOB_CONTROL                    = 688,
	FUNC_ADDMDAMAGE_PROPERTY               = 689,
	FUNC_SUBMDAMAGE_PROPERTY               = 690,
	FUNC_LOBBY_CAMPCODE                    = 691,
	FUNC_INSERT_ALIVE_MEMBER               = 692,
	FUNC_EQ_USERINFO_INIT                  = 693,
	FUNC_ADDQUESTINFO                      = 694,
	FUNC_ADDQUESTINFO2                     = 695,
	FUNC_SETQUESTJOB                       = 696,
	FUNC_SETQUESTSEX                       = 697,
	FUNC_SETQUESTLEVEL                     = 698,
	FUNC_SETQUESTJOBLEVEL                  = 699,
	FUNC_SETQUESTITEM                      = 700,
	FUNC_SETQUESTHOMUNLEVEL                = 701,
	FUNC_SETQUESTHOMUNTYPE                 = 702,
	FUNC_SETQUESTQUESTITEM                 = 703,
	FUNC_IS_SET_QUEST                      = 704,
	FUNC_IS_LOWLEVEL_SIEGE_JOB             = 705,
	FUNC_RESET_BUFF_LOWLEVEL_SIEGE         = 706,
	FUNC_EQ_MOVE_TO_LOBBY_JOB_MATCHING     = 707,
	FUNC_GET_YEAR                          = 708,
	FUNC_GET_MONTH                         = 709,
	FUNC_GET_DAY                           = 710,
	FUNC_GET_WEEK_DAY                      = 711,
	FUNC_MERGE_ITEM                        = 712,
	FUNC_DIALOG2                           = 713,
	FUNC_WAITDIALOG2                       = 714,
	FUNC_STORE_V2                          = 715,
	FUNC_CALLFALCON                        = 716,
	FUNC_SETPRNPCWINNER                    = 717,
	FUNC_PD_SUBSCRIPTION                   = 718,
	FUNC_PD_ENTER                          = 719,
	FUNC_SETQUESQUEST                      = 720,
	FUNC_TALK_SHOW                         = 721,
	FUNC_RENT_ITEM                         = 722,
	FUNC_PROVIDE_EXP                       = 723,
	FUNC_GET_MONSTER_HP                    = 724,
	FUNC_MONSTER_TALK_SHOW                 = 725,
	FUNC_CHECKJOBGROUP2                    = 726,
	FUNC_JOIN_CLAN                         = 727,
	FUNC_LEAVE_CLAN                        = 728,
	FUNC_SET_MONSTER_HP                    = 729,
	FUNC_ITEMDOWN2                         = 730,
	FUNC_GET_ELAPSED_TIMER                 = 731,
	FUNC_IS_ENABLE_NPC                     = 732,
	FUNC_GET_NPC_MONSTER_X                 = 733,
	FUNC_GET_NPC_MONSTER_Y                 = 734,
	FUNC_DELAY_TIME                        = 735,
	FUNC_SET_CLAN_MASTER                   = 736,
	FUNC_SAVEPOSITION                      = 737,
	FUNC_MOVETOSAVEPOSITION                = 738,
	FUNC_MDUNGEON_TRADER                   = 739,
	FUNC_SET_MONSTER_HP2                   = 740,
	FUNC_GET_RANKING_POINT                 = 741,
	FUNC_INC_RANKING_POINT                 = 742,
	FUNC_DEC_RANKING_POINT                 = 743,
	FUNC_NPC_MONTRANSFORM                  = 744,
	FUNC_PARTY_MAP_MOVE                    = 745,
	FUNC_IS_PREMIUM                        = 746,
	FUNC_SKILL_ORDER                       = 747,
	FUNC_REDUCE_PCCAFE_PLAY_TIME           = 748,
	FUNC_GET_PCCAFE_PLAY_TIME              = 749,
	FUNC_ADDHEALAMOUNT_KILLRANGE           = 750,
	FUNC_SUBHEALAMOUNT_KILLRANGE           = 751,
	FUNC_GETMEVENT_ITEMNAME_V2             = 752,
	FUNC_GET_NON_SLOT_ITEM_SOCK3           = 753,
	FUNC_NPCPROGRESS_BAR                   = 754,
	FUNC_TRADEITEM                         = 755,
	FUNC_TRADEBUY                          = 756,
	FUNC_TRADESELL                         = 757,
	FUNC_MARKETITEM                        = 758,
	FUNC_MARKET                            = 759,
	FUNC_OPENGUILDSTORAGE                  = 760,
	FUNC_OPENGUILDSTORAGELOG               = 761,
	FUNC_SETSKILL                          = 10000,
	FUNC_ONUSE                             = 10001,
	FUNC_ONSUCCESS                         = 10002,
	FUNC_SKILLTYPE                         = 10003,
	FUNC_SKILLMAXLV                        = 10004,
	FUNC_SKILLPATTERN                      = 10005,
	FUNC_SKILLSPLASH                       = 10006,
	FUNC_SKILLHITPERCENT                   = 10007,
	FUNC_SKILLATKPERCENT                   = 10008,
	FUNC_SKILLDATA1                        = 10009,
	FUNC_SKILLDATA2                        = 10010,
	FUNC_SKILLFLAG                         = 10011,
	FUNC_SKILLRANGE                        = 10012,
	FUNC_SKILLPROPERTY                     = 10013,
	FUNC_SKILLHANDICAP                     = 10014,
	FUNC_SKILLKNOCKBACK                    = 10015,
	FUNC_SKILLNODAMAGE                     = 10016,
	FUNC_SKILLSP                           = 10017,
	FUNC_SKILLPREDELAYTIME                 = 10018,
	FUNC_SKILLPOSTDELAYTIME                = 10019,
	FUNC_SKILLRESETHANDICAP                = 10020,
	FUNC_SKILLDRAINHP                      = 10021,
	FUNC_SKILLDRAINSP                      = 10022,
	FUNC_SKILLEVENT                        = 10023,
	FUNC_SKILLCASTFIXEDDELAY               = 10024,
	FUNC_SKILLCASTSTATDELAY                = 10025,
	FUNC_SKILLGLOBALPOSTDELAY              = 10026,
	FUNC_SKILLSINGLEPOSTDELAY              = 10027,
	FUNC_SKILLDATA3                        = 10028,
	FUNC_SKILLDATA4                        = 10029,
	FUNC_SKILLDATA5                        = 10030,
	FUNC_SKILLDATA6                        = 10031,
	FUNC_SKILLDATASTRING                   = 10032,
};


class CScriptEventHandler : public CInterpretHandler
{
public:
	enum
	{
		FUNC_RESULT_FAIL      = 0,
		FUNC_RESULT_SUCCESS   = 1,
		FUNC_RESULT_NOT_FOUND = 2,
	};

public:
	CScriptEventHandler();

public:
	virtual bool OnFunc(int func, std::deque<TokenData>& parm, TokenData& ret);
	virtual void OnError(const char* str);
	virtual void Free();
	virtual unsigned int Proc(bool isOnce);
	void OnMsg(unsigned long msgID, int par1, int par2, int par3);
	void Init(int ownerID);
	int GetOwnerID();
	bool RunInterpreter(CBinBuf* binBuf, int beginPos);

protected:
	bool CheckFixedVarNum(std::deque<TokenData>& parm, int n);
	void BanPlayer();
	bool FuncPutMob(const char* zone, int x, int y, int w, int h, int num, int mobId, int regenMin, int regenMax, int regenType, char* name, bool isBoss, bool bUseMobTomb);
	bool FuncGetEquipIsSuccessRefinery(int part, TokenData& ret, bool isAdvanced);
	bool FuncResetSkill();
	bool FuncShowImage(char* image, int type);
	bool FuncPcName(TokenData& ret);
	bool FuncInputStr(TokenData& ret);
	bool FuncBroadcastServer(char* color, int fontType, int fontSize, int fontAlign, int fontY, char* str);
	bool FuncReadBook(int bookID, int page);
	bool FuncGetEquipPercentRefinery(int part, TokenData& ret, bool isAdvanced);
	bool FuncGetEquipWeaponLv(int part, TokenData& ret);
	bool FuncGetWeaponClass(int part, TokenData& ret);
	bool FuncGetEquipSlotAmount(int part, TokenData& ret);
	bool FuncSetBuff(const char* in_EfstName, const int in_Time, const int in_Val1, const int in_Val2, const int in_Val3);
	bool FuncGetBuffValue(char* buffName, TokenData& ret);
	bool FuncLoudSpeaker(char* color, int fontType, int fontSize, int fontAlign, int fontY, char* str);
	bool FuncTargetAttackedBuff(int func, int percent, int who, char* buffName, int time, int value);
	bool FuncGetMapName(TokenData& ret);
	bool FuncGetActivatedSkill(TokenData& ret);
	bool FuncGetDeactivatedSkill(TokenData& ret);
	bool FuncIsSuccessRuneUse(int runeID, TokenData& ret);
	bool FuncGetPetRelationship(TokenData& ret);
	bool FuncIsEffectStatus(int effectenum, TokenData& ret);
	bool FuncRand(int min, int max, TokenData& ret);
	bool FuncIsPcCafe(TokenData& ret);
	bool FuncIsPremiumPcCafe(TokenData& ret);
	bool FuncGetExdEquipIsSuccessRefinery(int part, bool isAdvanced, TokenData& ret);
	bool FuncDownRefItem(int part, int down);
//	bool FuncDownAdvRefItem(int ); //TODO
	bool FuncSuccessRandomRefItem(int part, int min, int max, bool isAdvanced, TokenData& ret);
	bool FuncPlayBGM(const char* bgm);
	bool FuncStriptPC2(const int part);
	bool FuncGetEquipName(int part, TokenData& ret);
	bool FuncGetEquipItemIdx(int part, TokenData& ret);
	bool FuncSetEffect(const char* EFST_ID, const int ITID);
	bool FuncReSetEffect(const char* EFST_ID);
	bool FuncOpenSearchStorInfo(const int OpenType, const int SearchCount);
	bool FuncSetReadyMutationHomun(TokenData& ret);
	bool FuncMutationHomon(const int in_HomunSType, TokenData& ret);
	bool FuncCheckHomunLevel(TokenData& ret);
	bool FuncCheckHomunMutation(TokenData& ret);
	bool FuncCheckHomunCall(TokenData& ret);
	bool FuncResetBuff(const char* in_EfstName);
	bool FuncAddStateEfstATK(const int in_Who, const char* in_EfstName, const int in_Percent, const int in_AtkType, const int in_KeepTime);
//	bool FuncGetItem2(const int , const int , const int , const int ) //TODO
	bool FuncStartCollection(const int in_nITID);
	bool FuncMontransform(const int in_nMonsterJobType, const int in_nMinuteTime, const char* in_szBuffSpecialEfstName);
	bool FuncDeleteAllBodyItem();
	bool FuncIncGlobalVar(const char* in_Name, const int in_nValue);
	bool FuncDecGlobalVar(const char* in_Name, const int in_nValue);
	bool FuncGetAgitInvestMsg(TokenData& ret);
	bool FuncGetAgitEconomy(const char* in_Name, TokenData& ret);
	bool FuncIncAgitEconomy(const char* in_Name, const int in_nValue);
	bool FuncDecAgitEconomy(const char* in_Name, const int in_nValue);
	bool FuncEQMake(const char* in_EntryQueueName, const int in_nType, const int in_nMaxMember, const int in_nMinLevel, const int in_nMaxLevel);
	bool FuncEQCheckUser(const char* in_EntryQueueName, const int in_nTotalUser, TokenData& ret);
	bool FuncEQNotifyAdmission(const char* in_EntryQueueName);
	bool FuncEQIsReady(const char* in_EntryQueueName, TokenData& ret);
	bool FuncEQMoveToRoom(const char* in_EntryQueueName, const char* in_MapName, const int in_x, const int in_y);
	bool FuncEQReturnToPreSpace(const char* in_EntryQueueName);
	bool FuncEQMoveToLobby(const char* in_EntryQueueName, const char* in_LobbyName, const int in_nTotalUser, TokenData& ret);
	bool FuncLobbyMake(const char* in_LobbyName);
	bool FuncLobbyUserCount(const char* in_LobbyName, TokenData& ret);
	bool FuncLobbyNotifyAdmission(const char* in_LobbyName);
	bool FuncLobbyIsReady(const char* in_LobbyName, const int in_nTotalUser, TokenData& ret);
	bool FuncLobbyMoveToRoom(const char* in_LobbyName, const char* in_MapName, const int in_x, const int in_y);
	bool FuncLobbyReturnToPreSpace(const char* in_LobbyName);
	bool FuncLobbyInit(const char* in_LobbyName);
	bool FuncActiveMontransform(const int in_JobType);
	bool FuncDeActiveMontransform(const int in_JobType);
	bool FuncCheckJobGroup(const int in_GroupNum, TokenData& ret);
	bool FuncGetBaseJob(TokenData& ret);
	bool FuncGetCategoryJob(const int in_GroupNum, TokenData& ret);
	bool FuncEQJobControl(const char* in_EntryQueueName, const int in_nLimitJobType);
	bool FuncLobbyCampCode(const char* in_LobbyName, const char* in_CampCode, const int in_x, const int in_y);
	bool FuncInsertAliveMember();
	bool FuncEQUserInfoInit();
	bool FuncIsLowLevelSiegeJob(TokenData& ret);
	bool FuncResetBuffLowLevelSiege();
	bool FuncEQMoveToLobbyJobMatching(const char* in_EntryQueueName, const char* in_LobbyName_A, const char* in_LobbyName_B, TokenData& ret);
	bool FuncGetYear(TokenData& ret);
	bool FuncGetMonth(TokenData& ret);
	bool FuncGetDay(TokenData& ret);
	bool FuncGetWeekDay(TokenData& ret);
	bool FuncStoreV2(const int in_iStoreNumber, const char* in_StoreName);
	bool FuncMergeItem();
	virtual bool FuncClearDialog(int npcID);
	virtual bool FuncDialog(char* str, int npcID);
	virtual bool FuncCloseDialog(int npcID);
	virtual bool FuncWaitDialog(int npcID);
	virtual bool FuncDlgWriteStr(int npcID);
	virtual bool FuncMenu(std::deque<TokenData>& parm, int npcID);
	virtual bool FuncMapMove(const char* zone, int x, int y);
	virtual bool FuncSetEffectStatus(int effectenum);
	virtual bool FuncNavigationActive(const char* in_szMapName, const int in_nFindType, const int in_nSetType, const int in_bHide, const int in_nXpos, const int in_nYpos, const char* in_szpMobName);
	virtual bool FuncGetPremiumCampaignGrade(const int in_nMask, TokenData& in_ret, int npcID);
	bool FuncIsPremium(TokenData& ret);
	CNPC* AddNpc(int id, const char* mapName, NpcSvrNpcInfo* npcInfo);
	virtual void EventLog(char* str, ...);

private:
	void Exit();
	bool CheckSuspendType(int type);
	void Suspend(int type, int delay);
	short OnItemFunc(int func, std::deque<TokenData>& parm, TokenData& ret);
	short OnNpcFunc(int func, std::deque<TokenData>& parm, TokenData& ret);

protected:
	/* this+  0 */ //CInterpretHandler baseclass_0;
	/* this+  8 */ int m_ownerID;
	/* this+ 12 */ CInterpreter m_interpreter;
	/* this+ 76 */ std::string m_inputstr;
	/* this+104 */ int m_nParamSize;
	/* this+108 */ int m_suspendType; // enum SCRIPT_FUNC_ENUM
	/* this+112 */ int m_suspendTime;
	/* this+116 */ bool m_isQuit;
};
